Component({
  mixins: [],
  data: {
		tab:[
			{
				txt:'首页',
				active:false,
				url:'../index/index'
			},
			{
				txt:'活动创建',
				active:false,
				url:'../activities/activities'
			},
			{
				txt:'活动列表',
				active:false,
				url:'../activityList/activityList'
			},
			{
				txt:'权益发放',
				active:false,
				url:'../RIreceive/RIreceive'
			},
			{
				txt:'数据看板',
				active:false,
				url:'../dataSee/dataSee'
      },
      // {
			// 	txt:'test',
			// 	active:false,
			// 	url:'../test/test'
			// }
		]
	},
	props: {},
	onInit(){
		let lin = this.data.tab

		lin.map((v,i) => {
			if(i == this.props.active){
				v.active = true
			}else{
				v.active = false
			}
		})

		this.setData({
			tab:lin
		})
	},
  didMount() {},
  didUpdate() {},
  didUnmount() {},
  methods: {

		switchTab (e) {

      //console.log("fdjffjds",getCurrentPages());

      setTimeout(()=>{

        getApp().edit = ''    //清空是否编辑跳转过去的标识
        getApp().bs11 = 0

        my.redirectTo({
          url: e.target.dataset.url
        });

      },50)

			
		},

		lianXKeFy(){
			my.qn.openChat({
					nick: 'cntaobao若羽臣it',
					success: (res) =>{
						// my.alert({content:JSON.stringify(res)});
					},
					fail: (res) =>{
						// my.alert({content:JSON.stringify(res)});
					}
			})
		},

	},
});
